<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="cmd.css" rel="stylesheet" type="text/css">
<title>GRUB4DOS 内置菜单解释</title>
</head>

<body>
<p>内置菜单详解 <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-2菜单解释_外置.htm">外置菜单详解</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-3菜单解释_其他1.htm">其他菜单详解1</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-4菜单解释_其他2.htm">其他菜单详解2</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-5菜单解释_其他3.htm">其他菜单详解3</a></p>
<h2>发行版grub4dos压缩包中grldr文件内置菜单（预置菜单）详解</h2>
<p>#====================<strong>&nbsp;初始化命令组</strong>（菜单头）部分=========================</p>
<p><span class="bat">pxe</span> <strong>detect</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;检测当前PXE环境</span><br>
  <span class="bat">configfile</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp; 现在预置菜单具有最高控制权。它将在启动设备上的 menu.lst 之前获得控制。<br>
  #&nbsp;&nbsp;&nbsp; 在预置菜单的初始化命令组中使用不带参数的 configfile 命令，将把控制权转到启动设备上的menu.lst文件。</span><br>
  <span class="bat">default</span> <strong>0</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;将默认菜单项设置为菜单0（即第一个菜单项）</span><br>
  <span class="bat">timeout</span> <strong>1</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置自动执行默认菜单项前等待时间为1秒</span></p>
<p>#====================<strong>菜单项</strong>（菜单正文）=================================</p>
<p class="Notes"><span class="Options">title</span> <strong>find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;设置本项菜单的标题</span><br>
  <span class="bat">errorcheck</span> <strong>off</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;关闭错误检查模式</span><br>
  <span class="bat">configfile</span> <strong>/menu.lst</strong> <span class="Options">||</span> <span class="bat">configfile</span><strong> /MENU.LST</strong><br>
# &nbsp;&nbsp;&nbsp;先尝试加载根目录下的menu.lst文件，失败后尝试加载根目录下的MENU.LST文件（针对某些区分文件名大小写的文件格式）<br>
  <span class="bat">configfile</span> <strong>/boot/grub/menu.lst</strong> <span class="Options">||</span> <span class="bat">configfile</span> <strong>/BOOT/GRUB/MENU.LST</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;先尝试加载/boot/grub/目录下的menu.lst文件，失败后尝试加载/BOOT/GRUB/目录下的MENU.LST文件</span><br>
  <span class="bat">configfile</span> <strong>/grub/menu.lst</strong> <span class="Options">||</span> <span class="bat">configfile</span> <strong>/GRUB/MENU.LST</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;先尝试加载/grub/目录下的menu.lst文件，失败后尝试加载/GRUB/目录下的MENU.LST文件</span><br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/menu.lst</strong> <span class="Options">&amp;&amp;</span> <span class="bat">configfile</span> <strong>/menu.lst</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;以上尝试均失败时在所有设备的根目录下查找menu.lst文件，忽略软驱和光驱设备，找到的话就将该设备设为根，并加载该菜单文件</span><br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd </span><strong>/boot/grub/menu.lst</strong> <span class="Options">&amp;&amp;</span> <span class="bat">configfile</span> <strong>/boot/grub/menu.lst</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;上一个查找失败时在所有设备的/boot/grub/目录下查找menu.lst文件，忽略软驱和光驱设备，找到的话就将该设备设为根，并加载该菜单文件</span>  <br>
  <span class="bat">find</span> <span class="Options">--set-root --ignore-floppies --ignore-cd</span> <strong>/grub/menu.lst</strong> <span class="Options">&amp;&amp; </span><span class="bat">configfile</span><strong> /grub/menu.lst</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;上一个查找失败时在所有设备的/grub/目录下查找menu.lst文件，忽略软驱和光驱设备，找到的话就将该设备设为根，并加载该菜单文件</span>  <br>
  <span class="bat">errorcheck</span> <strong>on</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;打开错误检查模式</span>  <br>
<span class="bat">commandline</span><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;进入命令行模式</span></p>
<p><span class="Options">title</span><strong> commandline</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;设置本项菜单的标题</span>  <br>
<span class="bat">commandline</span><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;进入命令行模式</span></p>
<p><span class="Options">title</span> <strong>reboot</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;设置本项菜单的标题</span>  <br>
<span class="bat">reboot</span><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;重启启动计算机</span></p>
<p><span class="Options">title</span> <strong>halt</strong><br>
  <span class="Notes"># &nbsp;&nbsp;&nbsp;设置本项菜单的标题</span>  <br>
<span class="bat">halt</span><br>
<span class="Notes"># &nbsp;&nbsp;&nbsp;关闭计算机</span></p>
</body>
</html>
